﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Equin.ApplicationFramework;

namespace TimeReporter
{
    class DateRangeFilter : IItemFilter<TaskObject>
    {
        DateTime _startDateTime;
        DateTime _endDateTime;

        public DateTime StartDateTime
        {
            set { _startDateTime = value; }
        }

        public DateTime EndDateTime
        {
            set { _endDateTime = value; }
        }
        
        #region IItemFilter<TaskObject> Members



        bool IItemFilter<TaskObject>.Include(TaskObject item)
        {
            if (item.StartDateTime >= _startDateTime && item.EndDateTime <= _endDateTime)
            {
                return true;
            }
            else return false;

        }

        #endregion
    }
}
